#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

void find_single_dog(int* arr, int sz) {
	for (int i = 0; i <=sz - 1; i++) {
		int flag = 1;
		for (int j = 0; j <= sz - 2; j++) {
			int tmp = 0;
			if (arr[j] != arr[j + 1]) {
				tmp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = tmp;
			}
			else flag = 0;
		}
		if (flag) {
			printf("%d\n", arr[sz - 1]);
		}
	}
   return;
}

int main()
{
	int arr[] = { 1,2,3,4,5,1,2,3,4,6 };
	int sz = sizeof(arr) / sizeof(arr[0]);

	find_single_dog(arr, sz);

     return 0;
}